SubtleCrypto: digest() method

您所在的位置:网站首页 crypto browser SubtleCrypto: digest() method

SubtleCrypto: digest() method

#SubtleCrypto: digest() method| 来源: 网络整理| 查看: 265

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The digest() method of the SubtleCrypto interface generates a digest of the given data. A digest is a short fixed-length value derived from some variable-length input. Cryptographic digests should exhibit collision-resistance, meaning that it's hard to come up with two different inputs that have the same digest value.

It takes as its arguments an identifier for the digest algorithm to use and the data to digest. It returns a Promise which will be fulfilled with the digest.

Note that this API does not support streaming input: you must read the entire input into memory before passing it into the digest function.



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3